home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-07-31 | 58.4 KB | 2,138 lines |
- --------------------------------------------------------------------
- Notes about this patch:
-
- o src/transports/pipe.c now includes <ctype.h>.
-
- o src/transports/appendfile.c can now use SVR3 method for getting
- struct utimbuf, or it can declare the structure itself, for
- systems that don't seem to declare it anywhere.
-
- o Repaired the bind code, after all the errors that were introduced
- in the new features added in 3.1.21. Somebody please check out
- the changes, since I am not running bind anywhere and am not on
- the Internet.
-
- o Recent map entries have included an additional, unexpected, blank
- line that was causing unsharmap to fail. unsharmap is now
- tolerant of these blank lines.
-
- o For Interactive UNIX users, there is a workaround for the fact
- that signals during accept() are not handled by interrupting the
- system call with EINTR.
-
- o Added support for SGI IRIX version 3.3 and some specific support
- for SunOS4.1.
-
- o Installing binaries will use mcs, if it exists, to strip commentary
- information, in addition to the information removed by "strip".
-
- o The OTHER_SMAIL_NAMES variable can now be a space or colon-separated
- list. Previously, colons could not be used as separators, which
- was very confusing.
-
- o Added message grade selection criteria to method files. This
- allows message precedence values to influence the choice of
- transport. See the section on method file formats in the smail(5)
- man page for more information.
-
- o Fixed a number of traditional versus ANSI C problems, in both
- directions. Some fixes related to the fact that 3.1.21 was
- tested only with ANSI C compilers. Other fixes handle additional
- warning messages that I ignored for 3.1.21.
-
- o Fixed a potential data alignment problem in uuwho that could cause
- uuwho to dump core on some architectures or with some DBM variants.
-
- o Attempted to repair the damage caused by including additional time
- header files in main.c. If anyone encounters additional problems,
- please let me know (I hate header files :-].
-
- o When waiting for children of the queue-run daemon, on a BSD system,
- smail will now wait for all children in the signal handler.
- The previous releases would wait for exactly one child, which
- didn't cleanup all children, if two children died between calls
- to the handler.
- --------------------------------------------------------------------
- The following changes should be applied to the version 3.1.21
- sources for smail, to produce smail3.1.22. The version number
- that you are running can be found in the `level' file at the top of
- the source tree. It can also be found by running the command:
-
- smail -V -v
-
- For information on smail releases and how you can obtain a complete
- smail release or a patch release, send mail to the address:
-
- smail-patch@veritas.com
-
- or to the !-style address:
-
- ...{amdahl,apple,pyramid,uunet}!veritas!smail-patch
-
- include as the first line of the message one of the following lines:
-
- send help <addr>
- send index <addr>
- send patch <num> <addr>
-
- where <num> is a single patch number (e.g., 17) or a single patch range
- (e.g., 4-7) and where <addr> is your address relative to veritas. The
- <addr> is optional and if omitted your return path is used.
-
- The following patch should be applied to the smail3.1.21 release. To
- apply this patch, obtain a copy of the program patch, release 2.0 or
- higher. The patch utility has been posted to the USENET group
- comp.sources.unix, and is available from most sites that archive
- public domain programs. Apply this patch using the command:
-
- patch -p [-d /SMAIL_SOURCE_PATH] < this_patch_file
-
- where "-d /SMAIL_SOURCE_PATH" specifies a root based path to the top of
- the smail source tree, and where "patchfile" is the name of the file in
- which this patch is stored. The "-d /SMAIL_SOURCE_PATH" is not needed
- if the current directory is already the top of the smail source tree.
-
- NOTE: Don't forget the -p !!!!!
-
- Prereq: PATCH_NUMBER=21
- Index: patchnum
- ***************
- *** 1,3 ****
- ! # @(#)patchnum 1.4 28 May 1991 22:09:40
- ! PATCH_NUMBER=21
- ! PATCH_DATE=28-may-91
- --- 1,3 ----
- ! # @(#)patchnum 1.5 24 Jul 1991 18:52:33
- ! PATCH_NUMBER=22
- ! PATCH_DATE=24-jul-91
-
- Prereq: 3.1.21.1
- Index: level
- ***************
- *** 1,2 ****
- ! # @(#)level 1.4 28 May 1991 22:09:32
- ! 3.1.21.1 Tue May 28 22:07:09 PDT 1991
- --- 1,2 ----
- ! # @(#)level 1.5 24 Jul 1991 18:52:28
- ! 3.1.22.1 Wed Jul 24 18:51:49 PDT 1991
-
- Index: conf/os/irix3.3
- ***************
- *** 0 ****
- --- 1,38 ----
- + # @(#)conf/os/irix3.3 1.1 24 Jul 1991 %U
- + #
- + # irix3.3 - describe characteristics of SGI IRIX version 3.3
- + #
- + # contributed by lyndon@cs.athabascau.ca
- +
- + . $ROOT/conf/os/sys5.3
- +
- + # OSNAMES - add POSIX_OS to list of names, since it is POSIX-compliant
- + OSNAMES="$OSNAMES:POSIX_OS"
- +
- + # OSLIBS(list) - name any object libraries containing routines we will need
- + OSLIBS="-lPW -lsun -lc_s"
- +
- + # DRIVER_CONFIGURATION(variable) - configuration file describing smail drivers
- + DRIVER_CONFIGURATION=arpa-network # includes BIND/DNS router
- +
- + # HAVE(list) - list of attributes identified for your operating system
- + HAVE=$HAVE:RENAME:MKDIR:BSD_NETWORKING:SYSEXITS:NDBM:YP:GETHOSTNAME
- + HAVE=$HAVE:ULIMIT:RLIMIT
- +
- + # NOBODY(variable) - username to use for annonymous situations
- + NOBODY=nobody # BSD and SunOS-like systems
- +
- + # SECURE_PATH(variable) - a secure, :-separated list of exectuable directories
- + SECURE_PATH=/bin:/usr/bin:/usr/bsd
- +
- + # COMPRESS(variable) - an executable that compresses files
- + # COMP_FLAG(variable) - flag to use to force compression
- + # DOT_Z(variable) - suffix generated by compression program
- + # UNCOMPRESS(variable) - program to uncompress files
- + # ZCAT(variable) - program to write contents of compressed files to stdout
- +
- + COMPRESS=compress # for compress
- + COMP_FLAG=-f
- + DOT_Z=.Z
- + UNCOMPRESS=uncompress
- + ZCAT=zcat
-
- Index: conf/os/sun_os4.1
- ***************
- *** 0 ****
- --- 1,13 ----
- + # @(#)conf/os/sun_os4.1 1.2 24 Jul 1991 01:04:09
- + #
- + # sun_os4.1 - define the characteristics of SunOS release 4.1
- + #
- + # contributed by bruce@pooh.com
- +
- + . $ROOT/conf/os/sun_os4
- +
- + # MAILBOX_DIR - in which directory are user mailbox files
- + MAILBOX_DIR=/var/spool/mail
- +
- + # UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
- + UUCP_SYSTEM_FILE=/etc/uucp/Systems
-
- Index: README
- ***************
- *** 58,159 ****
- delivery_mode=queued
-
-
- ! CHANGES IN THE 3.1.21 RELEASE
-
- ! Release 3.1.21 is a patch release to smail3.1.20, which was a limited
- ! release of smail. The 3.1.20 release included significant work on the
- ! OS-configuration aspects of smail. The 3.1.21 is primarily a bug fix
- ! release. All of the enhancements are limited in scope.
-
- ! Some changes in 3.1.21 are:
-
- ! 1. Smail now tries to preserve the access time for mailbox files.
- ! This allows programs to compare the access time and modification
- ! time of mailbox files to determine if mail has arrived. The
- ! usability of this depends upon your mail user interface.
-
- ! 2. Added some optimization options to the DNS router driver (bind)
- ! to prevent lookups for domains that are known not to be in the
- ! DNS, or for names that apparently are not domains.
-
- ! 3. Added support to the bind router for delivering mail only
- ! to those sites with MX records. This is useful for some local
- ! area networks, but is generally not advisable on the Internet.
-
- - 4. Enhanced the /bin/mail "replacement" (in pd/binmail) to support
- - options of the SVR3 and SVR4 versions of /bin/mail.
- -
- - 5. Added support for HP-UX 7.0 and A/UX 2.0.
- -
- - 6. Better debugging messages are now generated, including complete
- - expanded headers, plus filenames (for appendfile) and shell
- - commands (for the pipe driver). Use a debugging level of at
- - least 6 to get all of the new debugging output.
- -
- Some bugs that were fixed:
-
- ! 1. Fixed a bug in the bind router that was resulting in considering
- ! some MX entries for a host to be invalid. The problem fixed was
- ! that the GETSHORT macro was being called with a regular char *
- ! rather than an unsigned char *. On some machines that supply
- ! a GETSHORT macro, this resulted in inappropriate sign extensions.
-
- ! 2. One C compiler (pcc for microport/286) couldn't handle four
- ! HDREQ() macro calls in an if statement. These were broken up
- ! into two if statements.
-
- ! 3. The help message printed by SMTP was in a single, multi-line
- ! string which was too long for some compilers (Xenix/286). This
- ! was broken up into multiple strings.
-
- ! 4. Several people pointed out that their systems could not include
- ! both <sys/time.h> and <time.h>, as was done in src/main.c. Only
- ! one of these will now be included, based on os-type.
-
- ! 5. The fwdfile director driver was calling xprintf with the wrong
- ! number of arguments, if a parsing error was encountered in a
- ! mailing list or .forward file, sometimes causing a core dump,
- ! often generating less than meaningful error messages.
-
- ! 6. Some machines do not support the <<-EOF construct (indented here
- ! documents) in /bin/sh. Uses of this construct were removed.
-
- ! 7. Shell scripts in the util source directory were not having the
- ! X_UTIL_PATH_X replaced by a propper set of directories. This
- ! resulted from the changes to mkdefs.sh in release 3.1.20. This
- ! has been fixed.
-
- ! 8. On some systems (Motorola V.3.2), use of greater than 14 character
- ! file names results in failure rather than name truncation. This
- ! was a problem for the installation procedure which uses four-
- ! character suffixes (.OLD and .NEW). These suffixes have been
- ! changed to .O and .N.
-
- ! 9. When using the malloc library supplied with SVR3, a structure
- ! cannot be referenced after it is freed. One known use of a
- ! freed structure (in smtprecv.c) was modified.
-
- ! 10. I found another case where an @user@host address was being
- ! generated, in smtplib.c.
-
- - 11. Smail for SunOS will not compile correctly if /usr/5bin is in
- - your PATH before /bin. To compensate, the sun_os4 conf/os file
- - sets CC to /bin/cc explicitly.
-
- - 12. The gethostbyname router driver was returning a NULL rather than
- - DB_NOMATCH in one case, causing occasionally incorrect behavior.
- -
- - 13. Fixed some problems with pathalias, including some problems with
- - ANSI C compilers, and a potential loop in generated output which
- - was exhibited at some sites by more recent postings of the USENET
- - map database.
- -
- - 14. The handling of :include: files would occasionally result in
- - inappropriate errors. This resulted from functions that were
- - supposed to return a value but instead had implicit returns.
- - The common symptom was an error message with a blank error.
- -
- -
- FUTURE SMAIL3 RELEASES
-
- Smail development has been on hold for quite a while, because the only
- --- 58,124 ----
- delivery_mode=queued
-
-
- ! CHANGES IN THE 3.1.22 RELEASE
-
- ! Release 3.1.22 is a patch release to smail3.1.21. It is primarily
- ! a bug fix release. All of the enhancements are limited in scope.
-
- ! Some changes in 3.1.22 are:
-
- ! 1. Added message-grade selection selection criteria to method files. This
- ! allows message precedence values to influence the choice of
- ! transport. See the section on method file formats in the smail(5)
- ! man page for more information.
-
- ! 2. Added support for SGI IRIX version 3.3, and for SunOS4.1.
-
- ! 3. Installing binaries will use mcs, if it exists, to strip commentary
- ! information, in addition to the information removed by "strip".
-
- Some bugs that were fixed:
-
- ! 1. src/transports/pipe.c now includes <ctype.h>.
-
- ! 2. src/transports/appendfile.c can now use SVR3 method for getting
- ! struct utimbuf, or it can declare the structure itself, for
- ! systems that don't seem to declare it anywhere.
-
- ! 3. Repaired the bind code, after all the errors that were introduced
- ! in the new features added in 3.1.21. Somebody please check out
- ! the changes, since I am not running bind anywhere and am not on
- ! the Internet.
-
- ! 4. Recent map entries have included an additional, unexpected, blank
- ! line that was causing unsharmap to fail. unsharmap is now
- ! tolerant of these blank lines.
-
- ! 5. For Interactive UNIX users, there is a workaround for the fact
- ! that signals during accept() are not handled by interrupting the
- ! system call with EINTR.
-
- ! 6. The OTHER_SMAIL_NAMES variable can now be a space or colon-separated
- ! list. Previously, colons could not be used as separators, which
- ! was very confusing.
-
- ! 7. Fixed a number of traditional versus ANSI C problems, in both
- ! directions. Some fixes related to the fact that 3.1.21 was
- ! tested only with ANSI C compilers. Other fixes handle additional
- ! warning messages that I ignored for 3.1.21.
-
- ! 8. Fixed a potential data alignment problem in uuwho that could cause
- ! uuwho to dump core on some architectures or with some DBM variants.
-
- ! 9. Attempted to repair the damage caused by including additional time
- ! header files in main.c. If anyone encounters additional problems,
- ! please let me know (I hate header files :-].
-
- ! 10. When waiting for children of the queue-run daemon, on a BSD system,
- ! smail will now wait for all children in the signal handler.
- ! The previous releases would wait for exactly one child, which
- ! didn't cleanup all children, if two children died between calls
- ! to the handler.
-
-
- FUTURE SMAIL3 RELEASES
-
- Smail development has been on hold for quite a while, because the only
- ***************
- *** 310,315 ****
- --- 275,313 ----
- though if you have any questions, or if you dispute this claim, please
- send mail. Sample configuration files can be found in the directory
- samples/.
- +
- +
- + SMAIL AND SYSTEM V
- +
- + System V systems typically have a /bin/mail program that both delivers
- + mail and reads mail. Smail provides a replacement for the /bin/mail
- + program, in pd/binmail, that uses the old /bin/mail for reading mail,
- + and smail for delivering mail. To use the replacement /bin/mail, you
- + will need to define the LMAIL variable in conf/EDITME. See
- + conf/EDITME for more instructions.
- +
- + The System V mailx utility will need to be updated to know how to find
- + smail. Presuming that smail is installed as /usr/lib/sendmail, you
- + will need to add the following line to the file /usr/lib/mailx/mailx.rc:
- +
- + set sendmail=/usr/lib/sendmail
- +
- +
- + SMAIL AND SCO UNIX
- +
- + Smail under SCO UNIX should be installed as both /bin/mail and
- + /usr/lib/mail/execmail. To do this, set OTHER_SMAIL_NAMES in the
- + EDITME file to "/bin/rmail:/usr/lib/mail/execmail". You will also
- + need to use the /bin/mail replacement in pd/binmail, just as in
- + System V. Some newer SCO UNIX systems also have a /usr/bin/rmail, as
- + a link to /usr/bin/mailx. This file should be deleted.
- +
- + Some versions of SCO UNIX store mail messages in /usr/spool/mail,
- + while others use /usr/mail, like System V. If your system uses
- + /usr/spool/mail, you will need to add the following line to the
- + conf/EDITME file:
- +
- + MAILBOX_DIR=/usr/spool/mail
-
-
- PATCHES
-
- Index: conf/EDITME-dist
- ***************
- *** 1,4 ****
- ! # @(#)conf/EDITME-dist 1.7 27 May 1991 15:16:41
- #
- # EDITME - edit me to perform high level configuration of smail
- #
- --- 1,4 ----
- ! # @(#)conf/EDITME-dist 1.9 30 Jul 1991 23:12:28
- #
- # EDITME - edit me to perform high level configuration of smail
- #
- ***************
- *** 45,62 ****
- #CFLAGS="-g -C" # UTS/580 debug
-
-
- ! # LDFLAGS - flags to pass to the loader, including special libraries
- #
- # optional
- #
- ! # These flags are passed to the cc command after any libraries or
- ! # flags specified in the conf/os file entry.
-
- ! #LIBS="-lc_s" # EXAMPLE: System V.3 shared libc
- #if [ "$FROM_ROOT" = src ]; then # EXAMPLE: The BIND resolver library
- # LIBS="-lresolv" # only used in the src
- #fi # directory
-
- # STRIP - define this if you wish to strip binaries when installing
- #
- # optional
- --- 45,84 ----
- #CFLAGS="-g -C" # UTS/580 debug
-
-
- ! # LDFLAGS - flags to pass to the loader
- #
- # optional
- #
- ! # These flags are passed to the cc command before any object
- ! # modules or libraries.
-
- ! #LDFLAGS=-L/usr/ucblib # use an alternate directory for libs
- ! #LDFLAGS="-L/usr/ucblib -Bstatic" # and don't use shared libraries
- !
- ! # LIBS - libraries to include in binaries
- ! #
- ! # optional
- ! #
- ! # These libraries are passed to the cc command before any libraries
- ! # mentioned in the conf/os file. It can be used to link in additional
- ! # libraries before the system libraries.
- !
- #if [ "$FROM_ROOT" = src ]; then # EXAMPLE: The BIND resolver library
- # LIBS="-lresolv" # only used in the src
- #fi # directory
-
- + # OSLIBS - ending libraries to include in binaries
- + #
- + # optional
- + #
- + # These libraries are passed to the cc command after all other
- + # libraries from any other source. For example, this can be used
- + # to force the use of an alternate C library, or a shared version
- + # of the C library.
- +
- + #OSLIBS=-lc_s # SVR3 shared C library
- +
- +
- # STRIP - define this if you wish to strip binaries when installing
- #
- # optional
- ***************
- *** 176,181 ****
- --- 198,231 ----
- # directory and "make install" explicitly.
-
- #LMAIL=/bin/lmail # standard System V
- +
- +
- + # MISC_DEFINES - miscellaneous definitions
- + #
- + # optional
- + #
- + # A colon-separated list that names miscellaneous macros to define
- + # for C programs and shell scripts. Each entry in the list can be
- + # a simple name, or the name can be followed by an equal sign to
- + # provide a value. For example:
- + #
- + # MISC_DEFINES="void=int:DECLARE_UTIMBUF"
- + #
- + # Defines void to be int for compilers that do not correctly support
- + # the void type, and declares the macro DECLARE_UTIMBUF, so that smail
- + # will not try to get the utimbuf structure from a header file.
- + #
- + # IMPORTANT FOR INTERACTIVE UNIX USERS:
- + #
- + # Some versions of Interactive UNIX have a <sys/socket.h> header
- + # file that directly includes the <time.h> header file, which is
- + # not protected against multiple inclusion. If your system has
- + # this problem, you will encounter a multiple declaration problem
- + # when compiling src/modes.o. To repair the situation, use:
- + #
- + # MISC_DEFINES=ISC_SOCKET_TIME_BUG
- +
- + #MISC_DEFINES=ISC_SOCKET_TIME_BUG
-
-
- # HOSTNAMES - names for the local host
-
- Index: conf/lib/inst.sh
- ***************
- *** 1,6 ****
- :
- #!/bin/sh
- ! # @(#)conf/lib/inst.sh 1.3 11 May 1991 19:25:32
- # Install a file under a list of names.
- #
- # usage: sh inst.sh [-lsr] [-u user] [-g group] [-m mode] [-d dir] src [dst...]
- --- 1,6 ----
- :
- #!/bin/sh
- ! # @(#)conf/lib/inst.sh 1.4 23 Jul 1991 22:23:52
- # Install a file under a list of names.
- #
- # usage: sh inst.sh [-lsr] [-u user] [-g group] [-m mode] [-d dir] src [dst...]
- ***************
- *** 214,220 ****
- continue
- fi
- case "$strip" in
- ! ?*) strip "$new";;
- esac
- case "$user" in
- ?*) if $dbg chown "$user" "$new"; then
- --- 214,224 ----
- continue
- fi
- case "$strip" in
- ! ?*) strip "$new"
- ! if [ -x /usr/bin/mcs ]; then
- ! mcs -d "$new"
- ! fi
- ! ;;
- esac
- case "$user" in
- ?*) if $dbg chown "$user" "$new"; then
-
- Index: conf/lib/instm.sh
- ***************
- *** 1,6 ****
- :
- #!/bin/sh
- ! # @(#)conf/lib/instm.sh 1.3 11 May 1991 19:25:40
- # Install a set of files into a directory
- #
- # usage: sh instm.sh [-sr] [-u user] [-g group] [-m mode] dir file...
- --- 1,6 ----
- :
- #!/bin/sh
- ! # @(#)conf/lib/instm.sh 1.4 23 Jul 1991 22:23:56
- # Install a set of files into a directory
- #
- # usage: sh instm.sh [-sr] [-u user] [-g group] [-m mode] dir file...
- ***************
- *** 81,87 ****
- continue
- fi
- case "$strip" in
- ! ?*) strip "$new";;
- esac
- case "$user" in
- ?*) if $dbg chown "$user" "$new"; then
- --- 81,91 ----
- continue
- fi
- case "$strip" in
- ! ?*) strip "$new"
- ! if [ -x /usr/bin/mcs ]; then
- ! mcs -d "$new"
- ! fi
- ! ;;
- esac
- case "$user" in
- ?*) if $dbg chown "$user" "$new"; then
-
- Index: conf/lib/mkdefs.sh
- ***************
- *** 1,5 ****
- #!/bin/sh
- ! # @(#)conf/lib/mkdefs.sh 1.10 29 May 1991 02:09:16
-
- # Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- #
- --- 1,5 ----
- #!/bin/sh
- ! # @(#)conf/lib/mkdefs.sh 1.14 24 Jul 1991 00:13:52
-
- # Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- #
- ***************
- *** 28,34 ****
- USE_SYMLINKS\
- SMAIL_BIN_DIR\
- SMAIL_NAME\
- - OTHER_SMAIL_NAMES\
- NEWALIASES\
- LIB_DIR\
- UNSHAR_MAP_DIR\
- --- 28,33 ----
- ***************
- *** 89,94 ****
- --- 88,94 ----
- OSNAMES\
- LIBS\
- OSLIBS\
- + OTHER_SMAIL_NAMES\
- "
-
- # lists to append together with newlines
- ***************
- *** 106,111 ****
- --- 106,112 ----
-
- # separators for list variables
- sep=":$IFS"
- + save_IFS="$IFS"
-
- # clear all EDITME/OS/ARCH variables
- for v in $VARS $LISTS $NLISTS; do
- ***************
- *** 219,228 ****
- esac
-
- case "$SPOOL_DIRS" in
- ! *:* ) MAIN_SPOOL_DIR="`sed 's/:.*//' <<EOF
- ! $SPOOL_DIRS
- ! EOF
- ! `" ;;
- * ) MAIN_SPOOL_DIR="$SPOOL_DIRS" ;;
- esac
- case "$LOG_DIR" in
- --- 220,226 ----
- esac
-
- case "$SPOOL_DIRS" in
- ! *:* ) MAIN_SPOOL_DIR=`expr "\$SPOOL_DIRS" : '\([^:]*\):.*'`;;
- * ) MAIN_SPOOL_DIR="$SPOOL_DIRS" ;;
- esac
- case "$LOG_DIR" in
- ***************
- *** 347,353 ****
- # as needed
- for v in $HAVE_REQUIRE; do
- found=no
- - save_IFS="$IFS"
- IFS="$sep"
- for v2 in $HAVE; do
- case "$v" in
- --- 345,350 ----
- ***************
- *** 370,375 ****
- --- 367,384 ----
- esac
- done
-
- + # replace : with ' ' in the OTHER_SMAIL_NAMES variable
- + list=$OTHER_SMAIL_NAMES
- + OTHER_SMAIL_NAMES=
- + IFS=$sep
- + for i in $list; do
- + case "$OTHER_SMAIL_NAMES" in
- + ?*) OTHER_SMAIL_NAMES="$OTHER_SMAIL_NAMES $i";;
- + *) OTHER_SMAIL_NAMES="$i";
- + esac
- + done
- + IFS=$save_IFS
- +
- echo "done" 1>&2
-
- # if DRIVER_CONFIGURATION does not begin with /, put it under the
- ***************
- *** 447,452 ****
- --- 456,462 ----
- OLD_LOGDIR='$OLD_LOGDIR'
- MAIN_SPOOL_DIR='$MAIN_SPOOL_DIR'
- EDITME='$EDITME'
- + OS_TYPE='$OS_TYPE'
- $MISC_SH_DEFINES
- EOF
-
- ***************
- *** 509,514 ****
- --- 519,525 ----
- -e 's/\([A-Z0-9_]*\)=\(..*\)/#define \1 "\2"/p' \
- -e 's/\([A-Z0-9_]*\)=$/#define \1 NULL/p'
- EDITME=$EDITME
- + OS_TYPE=$OS_TYPE
- RELATIVE_EDITME=$RELATIVE_EDITME
- MAIN_SPOOL_DIR=$MAIN_SPOOL_DIR
- HOSTNAMES=$HOSTNAMES
- ***************
- *** 589,594 ****
- --- 600,606 ----
- s|X_OLD_LOGDIR_X|$OLD_LOGDIR|g
- s|X_MAIN_SPOOL_DIR_X|$MAIN_SPOOL_DIR|g
- s|X_EDITME_X|$EDITME|g
- + s|X_OS_TYPE_X|$OS_TYPE|g
- EOF
-
- # write out the simple variables. Ignore variables with newlines or | chars
-
- Index: conf/os/386ix
- ***************
- *** 1,4 ****
- ! # @(#)conf/os/386ix 1.2 27 May 1991 15:24:04
- #
- # 386ix - define the characteristics of Interactive 386/IX with networking
- #
- --- 1,4 ----
- ! # @(#)conf/os/386ix 1.4 24 Jul 1991 01:40:52
- #
- # 386ix - define the characteristics of Interactive 386/IX with networking
- #
- ***************
- *** 14,17 ****
- DRIVER_CONFIGURATION=bsd-network
-
- # HAVE - what features should be used with this operating system
- ! HAVE=$HAVE:MKDIR:BSD_NETWORKING:GETHOSTNAME:
- --- 14,23 ----
- DRIVER_CONFIGURATION=bsd-network
-
- # HAVE - what features should be used with this operating system
- ! HAVE=$HAVE:MKDIR:BSD_NETWORKING:GETHOSTNAME
- !
- ! # MISC_DEFINES - miscellaneous things to put in the defs files
- ! #
- ! # DECLARE_UTIMBUF - utimbuf is not always declared in <sys/time.h>
- ! # ISC_ACCEPT_BUG - accept() not interruptible, use select() first
- ! MISC_DEFINES=DECLARE_UTIMBUF:ISC_ACCEPT_BUG
-
- Index: conf/os/template
- ***************
- *** 1,4 ****
- ! # @(#)conf/os/template 1.4 02 Dec 1990 23:49:57
- #
- # template - template for operating system configuration description
- #
- --- 1,4 ----
- ! # @(#)conf/os/template 1.5 24 Jul 1991 00:39:40
- #
- # template - template for operating system configuration description
- #
- ***************
- *** 321,326 ****
- --- 321,332 ----
- # environment variable TZ to GMT0 if it is not already
- # set.
- #
- + # DECLARE_UTIMBUF
- + # Some versions of System V do not define the utimbuf
- + # structure in <sys/time.h>, or in <utime.h>. If your
- + # system is one of these, then define DECLARE_UTIMBUF,
- + # and smail will define the utimbuf structure itself.
- + #
- # void=int
- # This must be used for systems that do not support the
- # void type. In particular, some older systems that
- ***************
- *** 333,339 ****
- # If this yields an error then you will need to set
- # void=int.
-
- ! #MISC_DEFINES=REQUIRE_TZ:void=int
-
-
- # MISC_C_DEFINES(list) - miscellaneous C defines
- --- 339,345 ----
- # If this yields an error then you will need to set
- # void=int.
-
- ! #MISC_DEFINES=REQUIRE_TZ:DECLARE_UTIMBUF:void=int
-
-
- # MISC_C_DEFINES(list) - miscellaneous C defines
-
- Index: man/man5/smail.an
- ***************
- *** 1,4 ****
- ! .\" @(#)man/man5/smail.an 1.7 28 May 1991 02:10:02
- .de BD '\% entry descriptions
- .br
- .TP
- --- 1,4 ----
- ! .\" @(#)man/man5/smail.an 1.8 24 Jul 1991 03:27:23
- .de BD '\% entry descriptions
- .br
- .TP
- ***************
- *** 1398,1403 ****
- --- 1398,1439 ----
- This is a catch-all feature which should
- only be used in the last entry in a
- method file.
- + .PP
- + Entries in a method file can be associated with particular message
- + grades. This allows different grades to use different transports,
- + such as non-demand UUCP for messages with a bulk or junk precedence.
- + Grade ranges are specified by appending a grade letter range to the
- + hostname, separated by \fB/\fP. Entries with grades can be in any
- + of the forms:
- +
- + .nf
- + \fIhostname\fP/X \fItransport-name\fP
- + \fIhostname\fP/X-* \fItransport-name\fP
- + \fIhostname\fP/*-Y \fItransport-name\fP
- + \fIhostname\fP/X-Y \fItransport-name\fP
- + .fi
- +
- + See the definition of the \fBgrades\fP configuration variable for
- + a discussion of grade letters, and their correlation with message
- + precedence strings. In the first form, the transport is used for
- + an exact match of the grade letter. In the second form, a match
- + requires a grade a character value of at least X. In the third, form
- + a match requires a grade character value of at most Y. The final
- + form specifies a range of grades from character value X to character
- + value Y.
- + .PP
- + For example, with the default value for the \fBgrades\fP variable,
- + the following file will use smtp for hosts \fBlocal1\fP and \fBlocal2\fP,
- + if the precedence is air-mail or better; otherwise, for any host
- + with a precedence of first-class or better, demand-polled uucp is
- + used; otherwise, queued uucp is used:
- +
- + .nf
- + local1/*-A smtp
- + local2/*-A smtp
- + */*-C demand_uucp
- + * uucp
- + .fi
- .SH "THE TRANSPORT FILE"
- The
- .I transport
-
- Index: pd/binmail/binmail.c
- ***************
- *** 1,4 ****
- ! /* @(#)pd/binmail/binmail.c 1.3 27 May 1991 15:13:59 */
-
- /* This program will be used in place of /bin/mail on System V sites.
- * It looks at the arguments and decides whether to call
- --- 1,4 ----
- ! /* @(#)pd/binmail/binmail.c 1.4 24 Jul 1991 00:32:22 */
-
- /* This program will be used in place of /bin/mail on System V sites.
- * It looks at the arguments and decides whether to call
- ***************
- *** 131,137 ****
- usage()
- {
- int i;
- ! char *usage_text[] = {
- "Usage: %s [-ehpPqr] [-f file] [-x debug]",
- " %s [-tosw] [-m message_type] [-T file] [-x debug] addr ...",
- " %s [-x debuglevel] -F addr ..."
- --- 131,137 ----
- usage()
- {
- int i;
- ! static char *usage_text[] = {
- "Usage: %s [-ehpPqr] [-f file] [-x debug]",
- " %s [-tosw] [-m message_type] [-T file] [-x debug] addr ...",
- " %s [-x debuglevel] -F addr ..."
-
- Index: pd/getopt/get_opt.c
- ***************
- *** 1,5 ****
- /*
- ! * @(#)pd/getopt/get_opt.c 1.2 24 Oct 1990 05:19:04
- */
-
- /*
- --- 1,5 ----
- /*
- ! * @(#)pd/getopt/get_opt.c 1.3 03 Jun 1991 02:09:04
- */
-
- /*
- ***************
- *** 24,34 ****
- * However, I am not about to post a copy of anything licensed by AT&T.
- */
-
- #include "defs.h"
-
- /*LINTLIBRARY*/
- - #define NULL 0
- - #define EOF (-1)
- #define ERR(s, c) if(opterr){\
- extern int write();\
- char errbuf[2];\
- --- 24,33 ----
- * However, I am not about to post a copy of anything licensed by AT&T.
- */
-
- + #include <stdio.h>
- #include "defs.h"
-
- /*LINTLIBRARY*/
- #define ERR(s, c) if(opterr){\
- extern int write();\
- char errbuf[2];\
-
- Index: pd/pathalias/arpatxt.c
- ***************
- *** 39,45 ****
- long fold();
- FILE *mkfile();
-
- ! extern char *malloc(), *index(), *calloc(), *gets(), *strcpy(), *fgets();
- extern FILE *fopen();
-
- #define ISADOMAIN(n) ((n) && *((n)->name) == '.')
- --- 39,45 ----
- long fold();
- FILE *mkfile();
-
- ! extern char *malloc(), *index(), *calloc(), *gets(), *fgets();
- extern FILE *fopen();
-
- #define ISADOMAIN(n) ((n) && *((n)->name) == '.')
-
- Index: pd/pathalias/config.h
- ***************
- *** 75,85 ****
- #else /*!BZERO*/
-
- #ifdef MEMSET
- - #ifdef __STDC__
- - extern void *memset();
- - #else /* __STDC__ */
- - extern char *memset();
- - #endif /* __STDC__ */
- #define strclear(s, n) ((void) memset((s), 0, (n)))
- #else /*!MEMSET*/
- extern void strclear();
- --- 75,80 ----
-
- Index: pd/pathalias/mapaux.c
- ***************
- *** 22,29 ****
- extern link *newlink();
- extern node *newnode();
- extern char *strsave();
- - extern int strcmp();
- - /* extern int strlen(); - declaration differs in ANSI C */
-
- /* exports */
- long pack();
- --- 22,27 ----
-
- Index: pd/pathalias/mem.c
- ***************
- *** 207,213 ****
- --- 207,217 ----
- * which are returned to the heap with addtoheap().
- */
-
- + #ifdef __STDC__
- + void *
- + #else
- char *
- + #endif
- mymalloc(n)
- register unsigned int n;
- { static unsigned int size; /* how much do we have on hand? */
-
- Index: pd/pathalias/parse.y
- ***************
- *** 20,26 ****
- extern node *addnode(), *addprivate();
- extern void fixprivate(), alias(), deadlink(), deletelink();
- extern link *addlink();
- - extern int strcmp();
- extern char *strsave();
- extern int optind;
- extern char *Cfile, *Netchars, **Argv;
- --- 20,25 ----
-
- Index: pd/uuwho/uuwho.c
- ***************
- *** 1,4 ****
- ! /* @(#)pd/uuwho/uuwho.c 1.2 24 Oct 1990 05:19:37 */
- /*
- * uuwho:
- * store/retrieve uucp map info in dbm format
- --- 1,4 ----
- ! /* @(#)pd/uuwho/uuwho.c 1.4 24 Jul 1991 01:00:08 */
- /*
- * uuwho:
- * store/retrieve uucp map info in dbm format
- ***************
- *** 49,55 ****
- char line[BUFSIZ + 1];
- FILE *fp;
-
- - extern char *strcpy();
- extern int errno; /* last system error */
-
- main(argc, argv)
- --- 49,54 ----
- ***************
- *** 67,73 ****
- position *p; /* the fetched record */
- extern char *optarg; /* the arg of a flag */
- extern int optind; /* the first non flag */
- !
- /*
- * parse args
- */
- --- 66,72 ----
- position *p; /* the fetched record */
- extern char *optarg; /* the arg of a flag */
- extern int optind; /* the first non flag */
- !
- /*
- * parse args
- */
- ***************
- *** 165,182 ****
- char *tp; /* pointer */
- char c; /* the char we are looking at */
- char unknown[2]; /* unknown #x line name */
-
- /*
- * open the file
- */
- ! if ((fp = fopen(p->name, "r")) == (FILE *)NULL) {
- fprintf(stderr, "%s: Can't open data file %s\n",
- ! cmdname, p->name);
- return;
- }
-
- /* seek to the starting location in the file */
- ! fseek(fp, p->pos, 0);
-
- /*
- * process the entry one line at a time
- --- 164,187 ----
- char *tp; /* pointer */
- char c; /* the char we are looking at */
- char unknown[2]; /* unknown #x line name */
- + position pos;
- +
- + /*
- + * Avoid alignment problems by making a copy of the structure.
- + */
- + (void) memcpy((char *) &pos, (char *) p, sizeof pos);
-
- /*
- * open the file
- */
- ! if ((fp = fopen(pos.name, "r")) == (FILE *)NULL) {
- fprintf(stderr, "%s: Can't open data file %s\n",
- ! cmdname, pos.name);
- return;
- }
-
- /* seek to the starting location in the file */
- ! fseek(fp, pos.pos, 0);
-
- /*
- * process the entry one line at a time
-
- Index: src/addr.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/addr.c 1.2 24 Oct 1990 05:21:33 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/addr.c 1.3 23 Jul 1991 19:56:10 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 1014,1023 ****
- --- 1014,1031 ----
- {
- struct addr *next;
-
- + DEBUG(DBG_ADDR_MID, "insert_addr_list() called:\n");
- + #ifndef NODEBUG
- + if (error) {
- + DEBUG2(DBG_ADDR_MID, "\tERR%ld: %s\n",
- + error->info, error->message);
- + }
- + #endif /* NODEBUG */
- /* loop over all of the input addrs */
- for (; in; in = next) {
- next = in->succ;
-
- + DEBUG1(DBG_ADDR_MID, "\t%s\n", in->in_addr);
- if (error) {
- in->error = error; /* set the error message, if given */
- }
-
- Index: src/default.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/default.c 1.3 22 Feb 1991 23:19:02 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/default.c 1.4 24 Jul 1991 03:12:10 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 463,470 ****
- */
- static struct method method_table[] = {
- /* you could list sites you wish to poll on demand, for example:
- ! * { "ihnp4", "demand" },
- ! * { "mcvax", "demand" },
- * if some sites require a different transport, make a transport
- * entry and give its name instead of "demand" or "uux".
- *
- --- 463,470 ----
- */
- static struct method method_table[] = {
- /* you could list sites you wish to poll on demand, for example:
- ! * { "ihnp4", -1, -1, "demand" },
- ! * { "mcvax", -1, -1, "demand" },
- * if some sites require a different transport, make a transport
- * entry and give its name instead of "demand" or "uux".
- *
- ***************
- *** 471,478 ****
- * The uux transport calls uux with the -r flag, so that requests are just
- * queued, uucico is not started to perform delivery immediately.
- */
- ! { "*", "uux" }, /* use "uux" for all other hosts */
- ! { NULL, 0}, /* end of first table */
- };
- # define METHOD_TABLE method_table
-
- --- 471,478 ----
- * The uux transport calls uux with the -r flag, so that requests are just
- * queued, uucico is not started to perform delivery immediately.
- */
- ! { "*", -1, -1, "uux" }, /* use "uux" for all other hosts */
- ! { NULL, -1, -1, 0}, /* end of first table */
- };
- # define METHOD_TABLE method_table
-
-
- Index: src/main.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/main.c 1.6 11 May 1991 18:35:11 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/main.c 1.7 02 Jun 1991 19:51:17 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 21,30 ****
- #include <pwd.h>
- #include <signal.h>
- #include "defs.h"
- ! #ifdef UNIX_BSD
- # include <sys/time.h>
- #endif /* UNIX_BSD */
- - #include <time.h>
- #if defined(HAVE_RLIMIT)
- # include <sys/resource.h>
- #endif /* HAVE_RLIMIT */
- --- 21,31 ----
- #include <pwd.h>
- #include <signal.h>
- #include "defs.h"
- ! #if defined(POSIX) || !defined(UNIX_BSD)
- ! # include <time.h>
- ! #else
- # include <sys/time.h>
- #endif /* UNIX_BSD */
- #if defined(HAVE_RLIMIT)
- # include <sys/resource.h>
- #endif /* HAVE_RLIMIT */
-
- Index: src/modes.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/modes.c 1.3 02 Dec 1990 03:46:28 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/modes.c 1.6 24 Jul 1991 18:30:50 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 27,35 ****
- #include <sys/stat.h>
- #include <pwd.h>
- #include <signal.h>
- ! #include <time.h>
- #include <errno.h>
- #include "defs.h"
- #if defined(HAVE_BSD_NETWORKING)
- # ifdef UNIX_CPC
- # include <h/types42.h>
- --- 27,40 ----
- #include <sys/stat.h>
- #include <pwd.h>
- #include <signal.h>
- !
- #include <errno.h>
- #include "defs.h"
- +
- + #ifndef ISC_SOCKET_TIME_BUG
- + #include <time.h>
- + #endif
- +
- #if defined(HAVE_BSD_NETWORKING)
- # ifdef UNIX_CPC
- # include <h/types42.h>
- ***************
- *** 58,63 ****
- --- 63,72 ----
- # include "error.h"
- #endif
-
- + #ifdef UNIX_BSD
- + # include <sys/wait.h>
- + #endif
- +
- /* variables exported from this file */
- int daemon_pid = 0;
-
- ***************
- *** 70,75 ****
- --- 79,100 ----
- static void set_queue_only();
- static void do_smtp();
-
- + /*
- + * Interactive UNIX 2.2 has a bug in accept(). If accept() is
- + * interrupted by an alarm signal, accept() does not return from
- + * waiting for a connection with errno set to EINTR. Unfortunately
- + * this is necessary for smail to process its mail queues at regular
- + * intervals, as specified with the -q option.
- + *
- + * Interactive's select() does work correctly, however. Thus,
- + * we use select() to determine when to call accept(), and catch
- + * alarm signals out of select(), instead of out of accept().
- + */
- +
- + #ifdef ISC_ACCEPT_BUG
- + fd_set fds_used, fds_read;
- + #endif
- +
-
- /*
- * build_host_strings - build the various types of hostnames
- ***************
- *** 727,732 ****
- --- 752,760 ----
- int as; /* accept socket */
- struct sockaddr_in sin, from; /* from is currently */
- struct servent *smtp_service; /* smtp service file entry */
- + #ifdef ISC_ACCEPT_BUG
- + int nsel;
- + #endif
-
- X_PANIC_OKAY();
-
- ***************
- *** 794,799 ****
- --- 822,841 ----
- DEBUG1(DBG_MAIN_MID, "listening on port %d...\n",
- smtp_service->s_port);
-
- + #ifdef ISC_ACCEPT_BUG
- + FD_ZERO(&fds_used);
- + FD_SET(ls, &fds_used);
- +
- + memcpy(&fds_read, &fds_used, sizeof(&fds_read));
- + nsel = select(ls + 1, &fds_read, (char *)0, (char *)0, (char *)0);
- + if (nsel < 0) {
- + if (errno != EINTR) {
- + write_log(LOG_PANIC, "select failed: %s", strerrno());
- + continue;
- + }
- + } else {
- + #endif /* ISC_ACCEPT_BUG */
- +
- /* get connection */
- as = accept(ls, (struct sockaddr *)&from, &len);
- if (as < 0 && errno != EINTR) {
- ***************
- *** 803,808 ****
- --- 845,855 ----
- if (as >= 0) {
- do_daemon_accept(ls, as, &from);
- }
- +
- + #ifdef ISC_ACCEPT_BUG
- + }
- + #endif
- +
- if (got_sighup) {
- write_log(LOG_SYS, "pid %d: SIGHUP received, exec(%s)",
- getpid(), smail);
- ***************
- *** 921,928 ****
- /*
- * daemon_sighup - note that we received a SIGHUP signal
- */
- static void
- ! daemon_sighup()
- {
- got_sighup = TRUE;
- (void) signal(SIGHUP, daemon_sighup);
- --- 968,977 ----
- /*
- * daemon_sighup - note that we received a SIGHUP signal
- */
- + /*ARGSUSED*/
- static void
- ! daemon_sighup(sig)
- ! int sig;
- {
- got_sighup = TRUE;
- (void) signal(SIGHUP, daemon_sighup);
- ***************
- *** 932,943 ****
- /*
- * daemon_sigchld - reap dead kids
- */
- static void
- ! daemon_sigchld()
- {
- (void) wait((int *)0);
- /* for System V we setup signal again */
- (void) signal(SIGCHLD, daemon_sigchld);
- }
- #endif /* SIGCHLD */
-
- --- 981,999 ----
- /*
- * daemon_sigchld - reap dead kids
- */
- + /*ARGSUSED*/
- static void
- ! daemon_sigchld(sig)
- ! int sig;
- {
- + #ifdef UNIX_BSD
- + while (wait3((int *)0, WNOHANG, 0) > 0)
- + ;
- + #else
- (void) wait((int *)0);
- /* for System V we setup signal again */
- (void) signal(SIGCHLD, daemon_sigchld);
- + #endif
- }
- #endif /* SIGCHLD */
-
- ***************
- *** 944,951 ****
- /*
- * daemon_sigalrm - note that we received a SIGALRM signal
- */
- static void
- ! daemon_sigalrm()
- {
- got_sigalrm = TRUE;
- (void) signal(SIGALRM, daemon_sigalrm);
- --- 1000,1009 ----
- /*
- * daemon_sigalrm - note that we received a SIGALRM signal
- */
- + /*ARGSUSED*/
- static void
- ! daemon_sigalrm(sig)
- ! int sig;
- {
- got_sigalrm = TRUE;
- (void) signal(SIGALRM, daemon_sigalrm);
-
- Index: src/notify.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/notify.c 1.3 27 May 1991 15:17:18 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/notify.c 1.4 24 Jul 1991 02:19:06 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 67,73 ****
- {
- register struct addr *cur;
-
- ! if (cur && exitvalue == EX_OK) {
- exitvalue = EX_UNAVAILABLE;
- }
-
- --- 67,73 ----
- {
- register struct addr *cur;
-
- ! if (addr && exitvalue == EX_OK) {
- exitvalue = EX_UNAVAILABLE;
- }
-
- ***************
- *** 110,116 ****
- struct addr *cur;
- struct defer_addr *link;
-
- ! if (cur && exitvalue == EX_OK) {
- exitvalue = EX_TEMPFAIL;
- }
-
- --- 110,116 ----
- struct addr *cur;
- struct defer_addr *link;
-
- ! if (addr && exitvalue == EX_OK) {
- exitvalue = EX_TEMPFAIL;
- }
-
-
- Index: src/queue.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/queue.c 1.6 18 Feb 1991 16:36:55 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/queue.c 1.7 03 Jun 1991 02:34:24 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 761,766 ****
- --- 761,767 ----
- if (c != EOF) {
- STR_NEXT(line, c);
- }
- + STR_NEXT(line, '\0');
- lp = line->p;
- if (line->i < 20) {
- /* less than 20 chars? couldn't possibly be a From_ line */
-
- Index: src/route.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/route.c 1.2 24 Oct 1990 05:24:17 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/route.c 1.3 24 Jul 1991 03:12:16 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 19,24 ****
- --- 19,25 ----
- * read_router_file, read_method_file
- */
- #include <stdio.h>
- + #include <ctype.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include "defs.h"
- ***************
- *** 706,712 ****
-
- mp = rp->method;
- while (mp->host) {
- ! if (EQIC(addr->next_host, mp->host) || EQ(mp->host, "*")) {
- /* found the right transport, use it */
- addr->transport = find_transport(mp->transport);
- if (addr->transport == NULL) {
- --- 707,715 ----
-
- mp = rp->method;
- while (mp->host) {
- ! if ((EQIC(addr->next_host, mp->host) || EQ(mp->host, "*")) &&
- ! (mp->mingrade < 0 || msg_grade >= mp->mingrade &&
- ! msg_grade <= mp->maxgrade)) {
- /* found the right transport, use it */
- addr->transport = find_transport(mp->transport);
- if (addr->transport == NULL) {
- ***************
- *** 969,974 ****
- --- 972,978 ----
- struct method *methods; /* method table */
- int ct = 0; /* count of methods */
- char *entry; /* text of file entry */
- + char *mgrade; /* restricted grades for this method */
- struct stat statbuf;
-
- if (f == NULL) {
- ***************
- *** 991,1001 ****
- if (new == NULL) {
- return NULL;
- }
- - ct++;
- methods = (struct method *)
- ! xrealloc((char *)methods, (ct + 1)*sizeof(*methods));
- ! methods[ct - 1].host = new->name;
- ! methods[ct - 1].transport = new->value;
- }
-
- /* zero out the ending record */
- --- 995,1024 ----
- if (new == NULL) {
- return NULL;
- }
- methods = (struct method *)
- ! xrealloc((char *)methods, (ct + 2)*sizeof(*methods));
- ! methods[ct].host = new->name;
- ! methods[ct].mingrade = -1;
- ! methods[ct].maxgrade = -1;
- ! methods[ct].transport = new->value;
- ! mgrade = strchr(new->name, '/');
- ! if (mgrade != NULL) {
- ! *mgrade++ = '\0';
- ! if (isalnum(mgrade[0])) {
- ! methods[ct].mingrade = mgrade[0];
- ! methods[ct].maxgrade = mgrade[0];
- ! }
- ! if (mgrade[1] == '-') {
- ! if (isalnum(mgrade[2])) {
- ! methods[ct].maxgrade = mgrade[2];
- ! } else {
- ! methods[ct].maxgrade = 255;
- ! }
- ! if (methods[ct].mingrade == -1)
- ! methods[ct].mingrade = 0;
- ! }
- ! }
- ! ct++;
- }
-
- /* zero out the ending record */
-
- Index: src/route.h
- ***************
- *** 1,4 ****
- ! /* @(#)src/route.h 1.2 24 Oct 1990 05:24:21 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/route.h 1.3 24 Jul 1991 03:12:21 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 30,35 ****
- --- 30,37 ----
- /* method - table associating hosts and transports */
- struct method {
- char *host; /* host name */
- + int mingrade; /* min grading for this entry */
- + int maxgrade; /* max grading for this entry */
- char *transport; /* transport name */
- };
-
-
- Index: src/routers/bind.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/routers/bind.c 1.5 28 May 1991 02:09:32 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/routers/bind.c 1.8 24 Jul 1991 03:35:03 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 240,246 ****
- { "local_mx_okay", t_boolean, NULL, NULL, BIND_LOCAL_MX_OKAY },
- { "defer_no_connect", t_boolean, NULL, NULL, BIND_DEFER_NO_CONN },
- { "defnames", t_boolean, NULL, NULL, BIND_DEFNAMES },
- ! { "defnames", t_boolean, NULL, NULL, BIND_DEFNAMES },
- { "ignore_domains", t_string, NULL, NULL,
- OFFSET(bind_private, ignore_domains) },
- };
- --- 240,247 ----
- { "local_mx_okay", t_boolean, NULL, NULL, BIND_LOCAL_MX_OKAY },
- { "defer_no_connect", t_boolean, NULL, NULL, BIND_DEFER_NO_CONN },
- { "defnames", t_boolean, NULL, NULL, BIND_DEFNAMES },
- ! { "domain_required", t_boolean, NULL, NULL, BIND_DOMAIN_REQUIRED },
- ! { "mx_only", t_boolean, NULL, NULL, BIND_MX_ONLY },
- { "ignore_domains", t_string, NULL, NULL,
- OFFSET(bind_private, ignore_domains) },
- };
- ***************
- *** 330,335 ****
- --- 331,337 ----
- * known not to exist in the DNS, such as .uucp or .bitnet.
- */
-
- + target = strip_dots(addr->target);
- if (priv->ignore_domains) {
- if (match_end_domain(priv->ignore_domains, target) != NULL) {
- return DB_NOMATCH;
- ***************
- *** 350,356 ****
-
- /* Step 1: Strip extra dots */
- /* store return values for common case */
- ! rt_info->next_host = target = strip_dots(addr->target);
- rt_info->route = NULL;
- rt_info->matchlen = strlen(addr->target);
-
- --- 352,358 ----
-
- /* Step 1: Strip extra dots */
- /* store return values for common case */
- ! rt_info->next_host = target;
- rt_info->route = NULL;
- rt_info->matchlen = strlen(addr->target);
-
- ***************
- *** 679,686 ****
- char msgbuf[MAXPACKET];
- int msglen;
- int anslen;
-
- ! msglen = res_mkquery(QUERY, qname, C_ANY, qtype, (char *)NULL, 0,
- (struct rrec *)NULL, msgbuf, MAXPACKET);
-
- anslen = res_send(msgbuf, msglen, (char *)answer, MAXPACKET);
- --- 681,694 ----
- char msgbuf[MAXPACKET];
- int msglen;
- int anslen;
- + static int inited = FALSE;
-
- ! if (!inited) {
- ! res_init();
- ! inited = TRUE;
- ! }
- !
- ! msglen = res_mkquery(QUERY, qname, C_IN, qtype, (char *)NULL, 0,
- (struct rrec *)NULL, msgbuf, MAXPACKET);
-
- anslen = res_send(msgbuf, msglen, (char *)answer, MAXPACKET);
-
- Index: src/spool.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/spool.c 1.2 24 Oct 1990 05:25:19 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/spool.c 1.4 23 Jul 1991 22:04:03 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 43,60 ****
- # include "extern.h"
- #endif
-
- ! #ifdef UNIX_BSD
- ! # include <sys/time.h>
- ! #else /* not UNIX_BSD */
- # include <time.h>
- #endif /* not UNIX_BSD */
-
- ! #ifdef UNIX_SYS5
- # include <fcntl.h>
- #endif
- - #ifdef UNIX_BSD
- - # include <sys/file.h>
- - #endif
-
- #ifdef STANDALONE
- # define xmalloc malloc
- --- 43,61 ----
- # include "extern.h"
- #endif
-
- ! #if defined(POSIX_OS) || !defined(UNIX_BSD)
- # include <time.h>
- + #else /* not UNIX_BSD */
- + # include <sys/time.h>
- #endif /* not UNIX_BSD */
-
- ! #if defined(UNIX_SYS5) || defined(POSIX_OS)
- # include <fcntl.h>
- + #else
- + # ifdef UNIX_BSD
- + # include <sys/file.h>
- + # endif
- #endif
-
- #ifdef STANDALONE
- # define xmalloc malloc
- ***************
- *** 88,94 ****
- struct log_msgs *succ;
- } *log_msgs; /* message lines to send to log */
- static struct log_msgs **next_log_msg; /* where to put next log message */
- ! static enum locker { l_creat, l_open, l_lock }; /* who is trying to lock */
-
- /* functions local to this file */
- static int int_creat_spool();
- --- 89,97 ----
- struct log_msgs *succ;
- } *log_msgs; /* message lines to send to log */
- static struct log_msgs **next_log_msg; /* where to put next log message */
- !
- ! /* types local to this file */
- ! enum locker { l_creat, l_open, l_lock }; /* who is trying to lock */
-
- /* functions local to this file */
- static int int_creat_spool();
-
- Index: src/sysdep.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/sysdep.c 1.4 27 May 1991 18:49:48 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/sysdep.c 1.6 03 Jun 1991 02:07:56 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 40,45 ****
- --- 40,49 ----
- #endif
- #if defined(UNIX_SYS5) || defined(POSIX_OS) || defined(USE_FCNTL)
- # include <fcntl.h>
- + #else
- + # if defined(UNIX_BSD)
- + # include <sys/file.h>
- + # endif
- #endif
-
- #if defined(POSIX_OS)
- ***************
- *** 51,60 ****
- # include <sys/utsname.h>
- #endif
-
- ! #if defined(UNIX_BSD)
- # include <sys/dir.h>
- #else
- ! # if defined(UNIX_XENIX)
- # include <sys/ndir.h>
- # else
- # if defined(HAVE_READDIR)
- --- 55,64 ----
- # include <sys/utsname.h>
- #endif
-
- ! #if defined(UNIX_BSD) && !defined(POSIX_OS)
- # include <sys/dir.h>
- #else
- ! # if defined(UNIX_XENIX) && !defined(POSIX_OS)
- # include <sys/ndir.h>
- # else
- # if defined(HAVE_READDIR)
- ***************
- *** 62,76 ****
- # define direct dirent
- # else
- # include <sys/dir.h>
- ! # endif /* defined(HAVE_READDIR) */
- ! # endif /* not defined(UNIX_XENIX) */
- ! #endif /* not defined(UNIX_BSD) */
-
- ! #if defined(UNIX_BSD) || defined(USE_SYS_TIME)
- ! # include <sys/time.h>
- ! # include <sys/file.h>
- ! #else
- # include <time.h>
- #endif
-
- #if !defined(UNIX_BSD) && !defined(UNIX_SYS5) && !defined(POSIX_OS)
- --- 66,79 ----
- # define direct dirent
- # else
- # include <sys/dir.h>
- ! # endif /* HAVE_READDIR */
- ! # endif /* UNIX_XENIX && !POSIX_OS */
- ! #endif /* UNIX_BSD && !POSIX_OS */
-
- ! #if defined(POSIX_OS) || !defined(UNIX_BSD)
- # include <time.h>
- + #else
- + # include <sys/time.h>
- #endif
-
- #if !defined(UNIX_BSD) && !defined(UNIX_SYS5) && !defined(POSIX_OS)
- ***************
- *** 622,628 ****
- int no_trunc_flag;
- int name_max;
-
- ! if (strlen(p) > _POSIX_NAME_MAX - 2) {
- *(p - 1) = '\0';
- no_trunc_flag = pathconf(fn, _PC_NO_TRUNC);
- if (! no_trunc_flag) {
- --- 625,631 ----
- int no_trunc_flag;
- int name_max;
-
- ! if ((int)strlen(p) > _POSIX_NAME_MAX - 2) {
- *(p - 1) = '\0';
- no_trunc_flag = pathconf(fn, _PC_NO_TRUNC);
- if (! no_trunc_flag) {
- ***************
- *** 631,637 ****
- *(p - 1) = '\0';
- if (no_trunc_flag < 0 || name_max < 0)
- return FAIL;
- ! if (! no_trunc_flag && strlen(p) > name_max - 2) {
- /*
- * If there is not enough room to append a .l, then
- * always succeed the lock operation. This is dangerous
- --- 634,640 ----
- *(p - 1) = '\0';
- if (no_trunc_flag < 0 || name_max < 0)
- return FAIL;
- ! if (! no_trunc_flag && (int)strlen(p) > name_max - 2) {
- /*
- * If there is not enough room to append a .l, then
- * always succeed the lock operation. This is dangerous
- ***************
- *** 904,910 ****
- int no_trunc_flag;
- int name_max;
-
- ! if (strlen(p) > _POSIX_NAME_MAX - 2) {
- *(p - 1) = '\0';
- no_trunc_flag = pathconf(fn, _PC_NO_TRUNC);
- if (! no_trunc_flag) {
- --- 907,913 ----
- int no_trunc_flag;
- int name_max;
-
- ! if ((int)strlen(p) > _POSIX_NAME_MAX - 2) {
- *(p - 1) = '\0';
- no_trunc_flag = pathconf(fn, _PC_NO_TRUNC);
- if (! no_trunc_flag) {
- ***************
- *** 913,919 ****
- *(p - 1) = '\0';
- if (no_trunc_flag < 0 || name_max < 0)
- return; /* directory not found? */
- ! if (! no_trunc_flag && strlen(p) > name_max - 2) {
- /*
- * If there is not enough room to append a .l, then
- * the lock operation should not have created a
- --- 916,922 ----
- *(p - 1) = '\0';
- if (no_trunc_flag < 0 || name_max < 0)
- return; /* directory not found? */
- ! if (! no_trunc_flag && (int)strlen(p) > name_max - 2) {
- /*
- * If there is not enough room to append a .l, then
- * the lock operation should not have created a
- ***************
- *** 1158,1164 ****
-
- /* keep trying to create a fork until we succeed or retries == 0 */
- while (
- ! #if defined(UNIX_BSD) || defined(HAVE_VFORK)
- (pid = (argv? vfork(): fork())) < 0 &&
- #else /* not UNIX_BSD && not HAVE_VFORK */
- (pid = fork()) < 0 &&
- --- 1161,1167 ----
-
- /* keep trying to create a fork until we succeed or retries == 0 */
- while (
- ! #if (defined(UNIX_BSD) || defined(HAVE_VFORK)) && !defined(DONT_USE_VFORK)
- (pid = (argv? vfork(): fork())) < 0 &&
- #else /* not UNIX_BSD && not HAVE_VFORK */
- (pid = fork()) < 0 &&
-
- Index: src/transports/appendfile.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/transports/appendfile.c 1.5 27 May 1991 18:17:56 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/transports/appendfile.c 1.7 24 Jul 1991 00:35:48 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 73,93 ****
- #include <sys/types.h>
- #include <sys/stat.h>
- #include "defs.h"
- ! #ifdef UNIX_SYS5
- # include <fcntl.h>
- #endif
- ! #ifdef UNIX_BSD
- # include <sys/file.h>
- #endif
- ! #if defined(UNIX_SYS5) || defined(HAVE_UTIME)
- # include <utime.h>
- # define RESTORE_ATIME
- ! #else /* not UNIX_SYS5 && not HAVE_UTIME */
- ! # if defined(UNIX_BSD) || defined(HAVE_UTIMES)
- ! # include <sys/time.h>
- # define RESTORE_ATIME
- ! # endif /* UNIX_BSD || HAVE_UTIMES */
- ! #endif /* UNIX_SYS5 || HAVE_UTIME */
- #include "../smail.h"
- #include "../smailconf.h"
- #include "../parse.h"
- --- 73,108 ----
- #include <sys/types.h>
- #include <sys/stat.h>
- #include "defs.h"
- ! #if defined(UNIX_SYS5) || defined(POSIX_OS)
- # include <fcntl.h>
- #endif
- ! #if defined(UNIX_BSD) && !defined(POSIX_OS)
- # include <sys/file.h>
- #endif
- ! #ifdef POSIX_OS
- # include <utime.h>
- # define RESTORE_ATIME
- ! # undef HAVE_UTIME
- ! # undef HAVE_UTIMES
- ! # define HAVE_UTIME
- ! #else /* not POSIX_OS */
- ! # if defined(UNIX_SYS5) || defined(HAVE_UTIME)
- ! # ifdef DECLARE_UTIMBUF
- ! struct utimbuf {
- ! time_t actime;
- ! time_t modtime;
- ! };
- ! # else
- ! # include <sys/time.h>
- ! # endif
- # define RESTORE_ATIME
- ! # else
- ! # if defined(UNIX_BSD) || defined(HAVE_UTIMES)
- ! # include <sys/time.h>
- ! # define RESTORE_ATIME
- ! # endif
- ! # endif
- ! #endif /* POSIX_OS */
- #include "../smail.h"
- #include "../smailconf.h"
- #include "../parse.h"
- ***************
- *** 737,753 ****
- struct stat statbuf;
- #if defined(UNIX_SYS5) || defined(HAVE_UTIME)
- struct utimbuf times;
- - #else
- - struct timeval tv[2];
- - #endif
-
- if (atime == 0 || stat(fname, &statbuf) < 0)
- return;
- - #if defined(UNIX_SYS5) || defined(HAVE_UTIME)
- times.actime = atime;
- times.modtime = statbuf.st_mtime;
- (void) utime(fname, ×);
- #else
- tv[0].tv_usec = tv[1].tv_usec = 0;
- tv[0].tv_sec = atime;
- tv[1].tv_sec = (long)statbuf.st_mtime;
- --- 752,766 ----
- struct stat statbuf;
- #if defined(UNIX_SYS5) || defined(HAVE_UTIME)
- struct utimbuf times;
-
- if (atime == 0 || stat(fname, &statbuf) < 0)
- return;
- times.actime = atime;
- times.modtime = statbuf.st_mtime;
- (void) utime(fname, ×);
- #else
- + struct timeval tv[2];
- +
- tv[0].tv_usec = tv[1].tv_usec = 0;
- tv[0].tv_sec = atime;
- tv[1].tv_sec = (long)statbuf.st_mtime;
-
- Index: src/transports/pipe.c
- ***************
- *** 1,4 ****
- ! /* @(#)src/transports/pipe.c 1.4 27 May 1991 18:18:39 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,4 ----
- ! /* @(#)src/transports/pipe.c 1.6 23 Jul 1991 19:56:59 */
-
- /*
- * Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 47,52 ****
- --- 47,53 ----
- * write failed on the pipe.
- */
- #include <stdio.h>
- + #include <ctype.h>
- #include <pwd.h>
- #include <grp.h>
- #include <signal.h>
- ***************
- *** 220,225 ****
- --- 221,227 ----
- fprintf(errfile, "\\%03o", c & 0xff);
- }
- }
- + putc('"', errfile);
- }
- putc('\n', errfile);
- }
-
- Index: util/Makefile
- ***************
- *** 1,5 ****
- #!/bin/make -f
- ! # @(#)util/Makefile 1.4 18 Feb 1991 15:21:15
- # Makefile for the smail utility tools
- #
- # Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- --- 1,5 ----
- #!/bin/make -f
- ! # @(#)util/Makefile 1.5 23 Jul 1991 22:24:11
- # Makefile for the smail utility tools
- #
- # Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
- ***************
- *** 38,44 ****
- mkuuwho mkhpath
- BIN_TARGETS=mkaliases
- TARGETS=${UTIL_TARGETS} ${BIN_TARGETS}
- ! STRIP_TARGETS=mkline mksort dcasehost mkdbm pathmerge
- OBJ=mkline.o mksort.o dcasehost.o mkdbm.o pathmerge.o \
- gleem.o unsharmap.o ${LOCAL_OBJ}
- CSRC=mkline.c mksort.c dcasehost.c mkdbm.c pathmerge.c gleem.c unsharmap.c
- --- 38,44 ----
- mkuuwho mkhpath
- BIN_TARGETS=mkaliases
- TARGETS=${UTIL_TARGETS} ${BIN_TARGETS}
- ! STRIP_TARGETS=mkline mksort dcasehost mkdbm pathmerge gleem unsharmap
- OBJ=mkline.o mksort.o dcasehost.o mkdbm.o pathmerge.o \
- gleem.o unsharmap.o ${LOCAL_OBJ}
- CSRC=mkline.c mksort.c dcasehost.c mkdbm.c pathmerge.c gleem.c unsharmap.c
- ***************
- *** 98,105 ****
- echo ${SHELL} ${INSTM} -m 0555 $$SMAIL_BIN_DIR ${BIN_TARGETS}; \
- ${SHELL} ${INSTM} -m 0555 $$SMAIL_BIN_DIR ${BIN_TARGETS}; \
- case "$$STRIP" in \
- ! ?*) echo "cd $$UTIL_BIN_DIR; strip ${STRIP_TARGETS}"; \
- ! (cd $$UTIL_BIN_DIR; strip ${STRIP_TARGETS});; \
- esac
-
- depend local_depend: check_defs
- --- 98,111 ----
- echo ${SHELL} ${INSTM} -m 0555 $$SMAIL_BIN_DIR ${BIN_TARGETS}; \
- ${SHELL} ${INSTM} -m 0555 $$SMAIL_BIN_DIR ${BIN_TARGETS}; \
- case "$$STRIP" in \
- ! ?*) for i in ${STRIP_TARGETS}; do \
- ! echo strip $$UTIL_BIN_DIR/$$i; \
- ! strip $$UTIL_BIN_DIR/$$i; \
- ! if [ -x /usr/bin/mcs ]; then \
- ! echo mcs -d $$UTIL_BIN_DIR/$$i; \
- ! mcs -d $$UTIL_BIN_DIR/$$i; \
- ! fi; \
- ! done; \
- esac
-
- depend local_depend: check_defs
-
- Index: util/unsharmap.c
- ***************
- *** 1,4 ****
- ! /* @(#)util/unsharmap.c 1.3 18 Feb 1991 15:24:54 */
- /*
- * Copyright (C) 1988 Ronald S. Karr and Landon Curt Noll
- *
- --- 1,4 ----
- ! /* @(#)util/unsharmap.c 1.4 23 Jul 1991 22:06:35 */
- /*
- * Copyright (C) 1988 Ronald S. Karr and Landon Curt Noll
- *
- ***************
- *** 506,514 ****
- }
-
- /*
- ! * skip the : lines
- */
- ! if (buf[0] == ':') {
- continue;
- }
-
- --- 506,514 ----
- }
-
- /*
- ! * skip the : lines and any blank lines
- */
- ! if (buf[0] == ':' || buf[0] == '\n') {
- continue;
- }
-
-